package com.itheima.demo.demo11;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
//1:客户端连接服务器,并发送 hello.服务器,我是客户端.
//2:开启上一题服务器,等待客户端连接,客户端连接并发送数据
public class Test_3 {
    public static void main(String[] args) throws IOException {
        Socket ck=new Socket("192.168.35.37",8888);
        OutputStream os = ck.getOutputStream();
        os.write("HELLO,服务器，我是客户端".getBytes());
        os.close();
        ck.close();
    }
}
